package com.oa.hyperion.schedulingtasks;

import com.oa.hyperion.service.AttenDanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class AttendanceScheduled {
    @Autowired
    AttenDanceService attenDanceService;

    @Scheduled(cron = "30 34 9 ? * MON-FRI")//周一至周五凌晨0点执行
    public void createAttendance() {
        attenDanceService.CreateAttendance();
    }

    @Scheduled(cron = "0 0 0 ? * MON-FRI")//周一至周五凌晨0点执行
    public void AttendanceJudge() {
        attenDanceService.AttendanceJudge();
    }
}
